<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>index</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
  </head>
  
  <body>
    
    <div id="tabProvince"></div>
    <p>    
    <div id="tabCity"></div>
    <p>
    <div id="tabRegion"></div>
    
    <script type="text/javascript" src="js/jquery-1.8.0.min.js"></script>
    <script type="text/javascript" src="manager/js/RegionData22.js"></script>
    <script type="text/javascript">
    	$(document).ready(function(){
    		var regionData = get_all_region_data();
    		var regionProvince = get_region_province(regionData);
    		var regionCity = get_region_city(regionData);
    		var regionRegion = get_region_region(regionData);
    		
    		var sProvince="<table><caption>province</caption>";
    		$.each(regionProvince, function(k, v){
    			sProvince += "<tr>";
    			sProvince += "<td>"+k+"</td>";
    			sProvince += "<td>"+v+"</td>";
    			sProvince += "</tr>";
    		});
    		sProvince+="</table>";
    		
    		//$('#tabProvince').html(sProvince);
    		
    		var sCity="<table><caption>city</caption>";
    		$.each(regionCity, function(k, v){
    			sCity += "<tr>";
    			sCity += "<td>"+k+"</td>";
    			sCity += "<td>"+v+"</td>";
    			sCity += "</tr>";
    		});
    		sCity+="</table>";
    		
    		//$('#tabCity').html(sCity);
    		
    		var sRegion="<table><caption>region</caption>";
    		$.each(regionRegion, function(k, v){
    			if (k.indexOf('00853') == 0 ) {
	    			sRegion += "<tr>";
	    			sRegion += "<td>"+k+"</td>";
	    			sRegion += "<td>"+v+"</td>";
	    			sRegion += "</tr>";
    			}
    		});
    		sRegion+="</table>";
    		
    		$('#tabRegion').html(sRegion);
    	});
    </script>
  </body>
</html>
